<style type="text/css">
div.loginbar {
	background-color:rgb(100,100,100);
	float:right;
	height:<?php echo $header_image_height; ?>px; 
	width:200px; 
	border:1px;
}
div.profiletext {
	padding-left:5px;
}
</style>

<?php if ( $user_ID ) : ?>
<?php wp_head();
	global $user_identity;
	//global $wp_roles;
	$user_info = wp_get_current_user();
	//echo $user_info->user_level;
?>

<div class="loginbar">  
	<div class="profiletext" style="color:white;">
		<b>Hello</b>, <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. 
		<br>[<a href="http://students.washington.edu/andreybr/wordpress/?page_id=208&user=<?php echo get_current_user_id(); ?>">Profile</a>]	
		<?php if($user_info->user_level == 10):?>
			<br>[<a href="http://students.washington.edu/andreybr/wordpress/?page_id=235" title="Manage Database">Manage Database</a>]	
		<?php endif; ?>
		<?php if($user_info->user_level > 1):?>
			<br>[<a href="http://students.washington.edu/andreybr/wordpress/?page_id=238" title="View Courses">View Courses</a>]	
			<br>[<a href="http://students.washington.edu/andreybr/wordpress/?page_id=241" title="Manage Courses">Manage Courses</a>]	
		<?php endif; ?>
		<br>[<a href="<?php echo wp_logout_url(); ?>" title="Log out of this account">Log Out</a>]			
	</div>
</div>

<?php else : ?>
<div class="loginbar">  
	<div class="profiletext">
		<form name="loginform" id="loginform" action="<?php echo get_option('siteurl'); ?>/wp-login.php" method="post">
			Username <input value="Username" class="input" type="text" size="20" tabindex="10" name="log" id="user_login" onfocus="if (this.value == 'Username') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Username';}" /> 
     	    Password <input value="Password" class="input" type="password" size="20" tabindex="20" name="pwd" id="user_pass" onfocus="if (this.value == 'Password') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Password';}" />
			<input name="rememberme" id="rememberme" value="forever" tabindex="90" type="checkbox"> Remember Me? <br />
			<input name="wp-submit" id="wp-submit" value="Log In" tabindex="100" type="submit">
			<input name="redirect_to" value="<?php echo get_option('siteurl'); ?>/wp-admin/" type="hidden">
			<input name="testcookie" value="1" type="hidden">
		</div>
	</form>
</div>
<?php endif; ?>